#include <REGX52.H>
#include "LCD1602.h"
#include "DHT11.h"
#include "Delay.h"
void main(){
	LCD1602_Init();
	DHT11_Init();
	LCD1602_PrintString(1,1,"Temp:");
	LCD1602_PrintString(2,1,"Humi:");
	LCD1602_PrintString(1,8,".\0");
	LCD1602_PrintString(2, 8, ".\0");
	while(1)
	{
		DHT11_ReadData();
		LCD1602_PrintNum(1,6,DHT11_GetTemperature(),2);
		LCD1602_PrintNum(1, 9, DHT11_GetTemperatureDecimal(),1);
		LCD1602_PrintNum(2, 6, DHT11_GetHumidity(), 2);
		LCD1602_PrintNum(2, 9, DHT11_GetHumidityDecimal(), 1);
		
		Delay(250);
	}
}